 <!-- Example table --> <div class="container_12"> 
      <div class="module">
                     <h2><span>Edit Venue Tariff</span></h2>
                        
                     <div class="module-body">
                         <div style="margin-top:13px;">
                        <?php
                        if(isset($errMsg)){?>
                        <span class="notification"><?php echo $_MESSESGE[$errMsg];?></span>
                        <?php }?></div>
                        
                        <form action="" name="admin_frm" id="admin_frm" method="post" enctype="multipart/form-data">
                            <p>                                
                                <label>
                                Vendor Name : <?php echo $result['vendor_name']; ?>
                                </label>
                            </p>
                            <p>
                                <label>Fixed Cost Items</label>
                                <select class="input-short" name="fixed_cost_items[]" id="fixed_cost_items" multiple>
                                    <?php echo $fixed_cost_items; ?>
                                </select>
                            </p>
                            <p>
                                <label>Variable Cost Items</label>
                                <select class="input-short" name="variable_cost_items[]" id="variable_cost_items" multiple>
                                    <?php echo $variable_cost_items; ?>
                                </select>
                            </p>

                            <p>                                
                                <label>
                                Venue Name : <?php echo $result['venue_name']; ?>
                                </label>
                            </p>
                            <!--<p>
                                <label>Venue</label>
                                <select name="venue">
                                    <option value="">Select Venue</option>
                                    <?php
                                    foreach($venues as $key => $val){
                                        $selected = ($val['id'] == $result['venue_id'])?'selected':'';?>
                                        <option value="<?php echo $val['id']; ?>" <?php echo $selected; ?>><?php echo $val['venue_name']; ?></option>
                                    <?php } ?>
                                </select>
                            </p>-->
                            <p>
                                <label>Name</label>
                                <div id="availability_info"></div>
                                <input type="text" class="input-short check_availability" name="name" value="<?php echo $result['name'];?>" />
                                <!--  <span class="notification-input ni-correct">This is correct, thanks!</span> -->
                            </p>  
                            <p>
                                <label>From Date</label>
                                <input name="from_date" type="text"  class="inputText" value="<?php echo $result['from_date']?>" size="10"/><a href="javascript:showCal('Calendar1')"><img src="<?php echo _SITE_ADMIN_URL_;?>images/calendar.jpg" alt="Click Here to Pick up the date" border="0" /></a>
                                <!-- <span class="notification-input ni-error">Sorry, try again.</span> -->
                            </p>
                            <p>
                                <label>To Date</label>
                                <input name="to_date" type="text"  class="inputText" value="<?php echo $result['to_date']?>" size="10"/><a href="javascript:showCal('Calendar2')"><img src="<?php echo _SITE_ADMIN_URL_;?>images/calendar.jpg" alt="Click Here to Pick up the date" border="0" /></a>
                                <!-- <span class="notification-input ni-error">Sorry, try again.</span> -->
                            </p>
                            <!--<p>
                                <label>Fixed Cost Items</label>
                                <textarea rows="7" cols="90" class="input-short" name="fixed_cost_items"><?php echo $result['fixed_cost_items'];?></textarea>
                            </p>
                            <p>
                                <label>Variable Cost Items</label>
                                <textarea rows="7" cols="90" class="input-short" name="variable_cost_items"><?php echo $result['variable_cost_items'];?></textarea>
                            </p>
                            <p>
                                <label>Cost Type</label>
                                <input type="radio" name="cost_type" value="1" <?php echo ($result['cost_type'] == 1)?'checked':''; ?>>Slab &nbsp;
                                <input type="radio" name="cost_type" value="2" <?php echo ($result['cost_type'] == 2)?'checked':''; ?>>Fixed
                            </p> -->
                            <p>
                                <label>Base Price</label>                                
                                <input type="text" class="input-short" name="total_cost" id="total_cost" value="<?php echo $result['total_cost'];?>">
                            </p>
                            <p>
                                <label>Person Allowed in Base Price</label>                                
                                <input type="text" class="input-short" name="no_of_people" id="no_of_people" value="<?php echo $result['no_of_people'];?>">
                            </p>
                            <p>
                                <label>Per Person Cost (When person exceed the base limit)</label>                                
                                <input type="text" class="input-short" name="per_person_cost" id="per_person_cost" value="<?php echo $result['per_person_cost'];?>">
                            </p>
                            <p>
                                <label>Discount Type</label>
                                <input type="radio" name="discount_type" value="1" <?php echo ($result['discount_type'] == 1)?'checked':''; ?>>Flat &nbsp;
                                <input type="radio" name="discount_type" value="2" <?php echo ($result['discount_type'] == 2)?'checked':''; ?>>Percentage
                            </p>
                            <p>
                                <label>Discount</label>
                                <input type="text" class="input-short" name="discount" id="discount" value="<?php echo $result['discount'];?>">
                            </p>
                            <p>
                                <label>Surcharge Type</label>
                                <input type="radio" name="surcharge_type" value="1" <?php echo ($result['surcharge_type'] == 1)?'checked':''; ?>>Flat &nbsp;
                                <input type="radio" name="surcharge_type" value="2" <?php echo ($result['surcharge_type'] == 2)?'checked':''; ?>>Percentage
                            </p>
                            <p>
                                <label>Surcharge</label>
                                <input type="text" class="input-short" name="surcharge" id="surcharge" value="<?php echo $result['surcharge'];?>">
                            </p>
                            <p>
                                <label>Tax Rate</label>
                                <input type="text" class="input-short" name="tax_rate" id="tax_rate" value="<?php echo $result['tax_rate'];?>">
                            </p>
                            
                            <p>
                                <label>Booking Amount</label>
                                <input type="text" class="input-short" name="booking_amount" id="booking_amount" value="<?php echo $result['booking_amount'];?>">
                            </p>
                            <p>
                                <label>Cancellation Policy</label>
                                <textarea rows="7" cols="90" class="input-short" id="cancellation_policy" name="cancellation_policy"><?php echo $result['cancellation_policy']; ?></textarea>
                            </p>
                            <p>
                                <label>Terms & Conditions</label>
                                <textarea rows="7" cols="90" class="input-short" id="tc_policy" name="tc_policy"><?php echo $result['tc_policy']; ?></textarea>
                            </p>
                            <fieldset>
                                <input class="submit-green" type="submit" name="submit" value="Submit" /> 
                               <input class="submit-gray" type="button" value="Cancel" onclick="javascript: window.location='<?php echo _SITE_ADMIN_URL_?>'+'venue/venuetariff_mng.php';" />
                            </fieldset>
                        </form>
                     </div> <!-- End .module-body -->

                </div>  <!-- End .module -->
                </div>
                <div style="clear:both;"></div>

<script language="javascript">
addCalendar("Calendar1", "Select Date", "from_date", "admin_frm");
addCalendar("Calendar2", "Select Date", "to_date", "admin_frm");
setFormat("yyyy-mm-dd");
</script>                              
<script type="text/javascript">
	var root_path = '<?php echo _SITE_ADMIN_URL_?>';
	var table = 'venue_tariff';
	var field = 'name';

    $().ready(function() {
		
		$("#admin_frm").validate({
			rules: {
				venue: "required",
				name: "required",
				from_date: "required", 
                to_date: "required",           
				booking_amount: "required",
				total_cost: {
                    required: true,
                    number: true
                },
                no_of_people: {
                    required: true,
                    digits: true
                },
                per_person_cost: "number"           
			},
			messages: {
				vendor: "Please select the venue",
				name: "Please enter tariff name",
				from_date: "Please Enter from date",
				to_date: "Plase Enter to date",            
				booking_amount: "Please enter booking amount",				
                total_cost: "Enter base price.",
                no_of_people: "Enter number of people allowed in base price.",
                per_person_cost: "Ener per person cost."                 
			}
		});
	});
</script>  
<script type="text/javascript" src="<?php echo _ADMIN_JS_; ?>check_availability.js"></script>